<% title "Edit Profile" %>

<%= error_messages_for 'user' %>

<h2>Edit Profile</h2>

<% form_for :user, @user, :url => user_path(@user, :subdomain => current_subdomain), :html => { :method => 'put', :multipart => true } do |form| %>
   <p><label for="person_name">Name</label><br/>
   <%= form.text_field :name %></p>

   <p><label for="email">Email</label><br/>
   <%= form.text_field :email %></p>

   <p>
      <%= form.file_field :photo %>
   </p>

   <p><label for="password">Password</label><br/>
   <%= form.password_field :password %></p>

   <p><label for="password_confirmation">Confirm Password</label><br/>
   <%= form.password_field :password_confirmation %></p>
   
   <p><%= submit_tag 'Update' %> or <%= link_to('Cancel', user_path(@user, :subdomain => current_subdomain)) %></p>
<% end %>